package cn.yanlin.springcloud.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author zhangyanlin
 * @version 1.0
 * @date 2021/10/7 20:43
 */
@Data
//有参函数
@AllArgsConstructor
//无参函数
@NoArgsConstructor
//返回给前端的json实体串
public class CommonResult<T> {
    //404 not_found
    //类似404,500的数字编码
    private Integer code;
    //返回前端的消息
    private String message;
    private T data;
    private CommonResult(Integer code,String message){
        this(code,message,null);
    }
}
